<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>事件流</title>
	</head>
	<body>
		<div style="width:100px;height:100px"></div>
		<script>
			document.getElementsByTagName("div")[0].onclick = function(e){
				alert(div);
				var oEv = e|| event;
				//阻止冒泡的兼容性处理
				if(oEv.stopPropagation()){
					oEv.stopPropagation();//非IE下
				}else{
					oEv.cancelBubble = true;//是否阻止冒泡 IE8以上的支持
				}
				
			};
		</script>
	</body>
</html>
